home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip CMCD0400.iso / OFFLINE / sursemsa / Macro Word / Agent.bas
Encoding:
BASIC Source File  |  2000-02-17  |  607 b   |  30 lines

  1. Attribute VB_Name = "NewMacros"
  2. Option Explicit
  3. Const GENIEPATH = "C:\Windows\Msagent\chars\Genie.acs"
  4. Dim MSAgent As Agent
  5. Dim vrajitor As Object
  6. Sub Speak()
  7. Set MSAgent = New Agent
  8.  MSAgent.Connected = True
  9.  MSAgent.Characters.Load "Genie", GENIEPATH
  10.  Set vrajitor = MSAgent.Characters("Genie")
  11. With vrajitor
  12. .Top = 125
  13. .Left = 185
  14. .Show
  15. .Play "Greet"
  16. If ActiveDocument.Characters.Count <= 1 Then
  17.  .Speak "This document is empty"
  18.  Else
  19.  .MoveTo 600, 400
  20. .Play "Read"
  21. .Speak ActiveDocument.Content
  22. .Play "ReadReturn"
  23. .Play "Idle2_2"
  24. .Play "Wave"
  25. End If
  26. .Hide
  27. End With
  28. End Sub
  29.  
  30.